<template>
    <el-tiptap v-model="content" width="100%" height="100%" :extensions="extensions"></el-tiptap>
</template>

<script>
    import {
        ElementTiptap,
        Doc,
        Text,
        Paragraph,
        Heading,
        Bold,
        Italic,
        Strike,
        Underline,
        Link,
        Image,
        Iframe,
        CodeBlock,
        Blockquote,
        ListItem,
        BulletList,
        OrderedList,
        TodoItem,
        TodoList,
        TextAlign,
        Indent,
        LineHeight,
        HorizontalRule,
        HardBreak,
        TrailingNode,
        History,
        Table,
        TableHeader,
        TableCell,
        TableRow,
        FormatClear,
        TextColor,
        TextHighlight,
        Preview,
        Print,
        Fullscreen,
        SelectAll
    } from 'element-tiptap'

    export default {
        data() {
            return {
                content: '111',
                extensions: [
                    new Doc(), new Text(), new Paragraph(), new Heading({
                        level: 6
                    }), new Bold({
                        bubble: true
                    }), // 在气泡菜单中渲染菜单按钮
                    new Italic(), new Strike(), new Underline(), new Link(), new Image(), new Iframe(),
                    new CodeBlock(),
                    new Blockquote(), new ListItem(), new BulletList(), new OrderedList(), new TodoItem(),
                    new TodoItem(),
                    new TodoList(), new TextAlign(), new Indent(), new LineHeight(), new HorizontalRule(),
                    new HardBreak(),
                    new TrailingNode(), new History(), new Table(), new TableHeader(), new TableCell(),
                    new TableRow(), new FormatClear(),
                    new TextColor(), new TextHighlight(), new Preview(), new Print(), new Fullscreen(),
                    new SelectAll()
                ],
            }
        },
        components: {
            'el-tiptap': ElementTiptap
        },
        computed: {

        },
        watch: {

        },
        methods: {

        },
        beforeCreate() {
            //创建前
        },
        created() {
            //创建
        },
        beforeMount() {
            //渲染前
            // this.();
            // this.();
        },
        mounted() {
            //渲染
        },
        activated() {
            //可见
        },
        deactivated() {
            //隐藏
        },
        beforeUpdate() {
            //更新前
        },
        updated() {
            //更新
        },
        beforeDestroy() {
            //销毁前
        },
        destroyed() {
            //销毁
        }
    };
</script>